
	 function getUploader(fileId,valueId,fileList,queueId,uploadCallbackMethod){
		 
		 
		// checkFlashPlayer();//检测Flash插件
		 
		 var fileExt='*.doc;*.docx;*.xls;*.rar;*.zip;*.txt;*.pdf;*.jpg;*.png;*.gif;*.bmp;*.swf;*.xlsx;*.gif;*.jpg;*.png;*.bmp;*.ppt;*.pptx';
		 
		 $(fileId).uploadify({
				'uploader':'../scripts/jquery/uploadify/uploadify.swf',   
				'script':'uploadFile!uploadAttr.action',   
				'cancelImg':'../images/icons/remove.gif',  
				'fileExt':fileExt,
				'fileDesc':'doc;docx;xls;rar;zip;txt;pdf;jpg;png;gif;bmp;swf;xlsx;',
				'removeCompleted':true,
				'queueID':queueId,   
				'width':158,
				'height':24,
	            'auto':false,
	            'multi':true,
 				'buttonImg':'../images/icons/'+i18n['image_upload_icon'],
 				'onSelect':function(e, queueId, fileObj){
 					if(fileExt.indexOf(fileObj.type.toLowerCase())==-1){
 						msgAlert(i18n['file_disAllow_upload'],'info');
 						return false;
 					}
 				},
 				'onAllComplete':function(){
 					
 					
 					if (uploadCallbackMethod) {
						uploadCallbackMethod();
					}
 					
 				},
				'onComplete':function(event, queueID, fileObj, response, data){
					
					response=eval('('+response+')');
					if(fileExt.indexOf(fileObj.type.toLowerCase())!=-1){
						$(valueId).val($(valueId).val()+fileObj.name+"=="+response.msg+"-s-");
					}	
					var fileName=response.msg;
					fileName=fileName.substring(fileName.lastIndexOf("/")+1,fileName.lastIndexOf("."))
					var attachIcon="../images/attachicons/unknown.gif";
					var fileFix=fileObj.type.toLowerCase();
					if(fileFix==".rar"){
						attachIcon="../images/attachicons/rar.gif";
					}
					if(fileFix==".zip"){
						attachIcon="../images/attachicons/zip.gif";
					}
					if(fileFix==".gif"||fileFix==".jpg"||fileFix==".bmp"||fileFix==".png"){
						attachIcon="../images/attachicons/image.gif";
					}
					if(fileFix==".doc"||fileFix==".docx"||fileFix==".xls"||fileFix==".ppt"||fileFix==".xlsx"){
						attachIcon="../images/attachicons/msoffice.gif";
					}
					if(fileFix==".pdf"){
						attachIcon="../images/attachicons/pdf.gif";
					}
					if(fileFix==".swf"){
						attachIcon="../images/attachicons/flash.gif";
					}
					if(fileFix==".txt"){
						attachIcon="../images/attachicons/text.gif";
					}
					
					
					
					var htmlCode="<div id='"+fileName+"' ><img width='14px' height='14px' src='"+attachIcon+"' />&nbsp;&nbsp;"+fileObj.name+"&nbsp;&nbsp;<a  href=javascript:deleteFile('"+response.msg+"','"+fileList+"','"+valueId+"')>"+i18n['deletes']+"</a><br/>";
					
					if(response.err==""){
						
						$(fileList).append(htmlCode);
					}
					
					
				}
			});			
	 }
	 
	 
	 
	 /**
	  * 删除上传后的文件
	  */
	 function deleteFile(fileName,fileList,valueId){
		 
		 
		 
		 $.messager.confirm(i18n['msg_msg'],'<br/>'+i18n['msg_confirm_deleteAttachment'],function(r){
				if(r){
					
					fileName=fileName.substring(fileName.lastIndexOf("/")+1);
					var divId=fileName.substring(0,fileName.lastIndexOf("."));
					$("div#"+divId).remove();     //删除匹配元素
					var _url = "uploadFile!deleteFile.action?deleteFileName="+fileName;
					$.post(_url,function(){
					//删除值
					var fileValue=$(valueId).val();
					var newFileValue="";
					var valArr=fileValue.split("-s-");
					for(var i=0;i<valArr.length;i++){
						if(valArr[i].indexOf(fileName)==-1){
							newFileValue=newFileValue+valArr[i]+"-s-"
						}
					}
					
					newFileValue=newFileValue.replace("-s--s-","-s-");
					$(valueId).val(newFileValue);
					})
				}
			});
	 }
	 
	 
	 /**
	  * 检查Flash插件是否安装
	  */
	 function checkFlashPlayer(){
		 
		 
		 var hasFlash=0;//是否安装了flash
		 var flashVersion=0; //flash版本
	
		 if($.browser.msie){//IE
			 
				var swf = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
				if (swf) {
					hasFlash = 1;
					VSwf = swf.GetVariable("$version");
					flashVersion = parseInt(VSwf.split(" ")[1].split(",")[0]);
				}

		}else{//其它浏览器
			
			if (navigator.plugins && navigator.plugins.length > 0) {
				var swf = navigator.plugins["Shockwave Flash"];
				if (swf) {
					hasFlash = 1;
					var words = swf.description.split(" ");
					for ( var i = 0; i < words.length; ++i) {
						if (isNaN(parseInt(words[i])))
							continue;
						flashVersion = parseInt(words[i]);
					}
				}
			}
		}
		 
		if(hasFlash==0){
			$('.easyui-window').window('close');
			msgAlert("<a href='javascript:void(0)' onclick='window.open(\"http://get.adobe.com/cn/flashplayer/\")'>"+i18n['msg_flash_player_not_installed']+"</a>",'warning');
		}
	 }